<div class="block-main">
<script type="text/javascript">$(function(){_showfilm(0)});</script>
				<div class="breadcrumbs">
					<div xmlns:v="http://rdf.data-vocabulary.org/#" class="cufont">
						<span typeof="v:Breadcrumb"><a property="v:title" href="<?=MAIN_URL;?>">Xem phim</a></span> > 
						<span typeof="v:Breadcrumb">
							<a property="v:title" rel="v:url" href="<?=URL_LOAD?>" title="<?=$h2title?>"><?=$h2title?></a>
						</span>
					 </div>
                     <!-- begin show film -->
					 <div class="pagesRight"><a id="_txt_l2"  title="Xắp xếp theo" class="drop" href="#" onclick="return _droplist('#drop_list_2');"><span id="_load"></span><span class="arrow"></span></a><a id="_txt_l1" title="Thể loại phim" class="drop" href="#" onclick="return _droplist('#drop_list_1');"><span id="_load"></span><span class="arrow"></span></a><a id="_txt_l3" class="drop" href="#" onclick="return _droplist('#drop_list_3');" title="Quốc gia"><span id="_load"></span><span class="arrow"></span></a><a href="#" class="_go" onclick="return _showfilm('<?=URL_LOAD;?>');" id="_go_" title="Hiện thị danh sách này!">»</a></div>
				</div>

				<div class="drop_list drop_list_1" id="drop_list_1">
                <a class="<? if($categoryid==0) echo 'activer';?>" rel="Tất cả" did="0" onclick="return _lTxt(this,1);">Tất cả</a>
				<?php
				$category	=	$db->database("danhmucid,danhmucten","category","danhmucid != 0 ORDER BY danhmucstt ASC");
                for($i=0;$i<count($category);$i++) {	
                    $url_category	=	url_link($category[$i][1],0,'the-loai');
					if($categoryid	==	$category[$i][0]) $cz[$i]	= "activer";
                    echo "<a class=\"".$cz[$i]."\" onclick=\"return _lTxt(this,1);\" did=\"".$category[$i][0]."\" rel=\"".$category[$i][1]."\">".$category[$i][1]."</a>";
                }
				?>
				</div>

				<div class="drop_list " id="drop_list_2"><a class="<? if($order=='time' || !$order) echo 'activer';?>" rel="Mặc định" did="time" onclick="return _lTxt(this,2);">Mặc định</a><a class="<? if($order=='new') echo 'activer';?>" rel="Mới cập nhật" did="new" onclick="return _lTxt(this,2);">Mới cập nhật</a><a class="<? if($order=='view') echo 'activer';?>" rel="Xem nhiều nhất" did="view" onclick="return _lTxt(this,2);">Xem nhiều nhất</a><a class="<? if($order=='year') echo 'activer';?>" rel="Năm phát hành" did="year" onclick="return _lTxt(this,2);">Năm phát hành</a><a class="<? if($order=='name') echo 'activer';?>" rel="Tên phim" did="name" onclick="return _lTxt(this,2);">Tên phim</a></div>

				<div class="drop_list drop_list_2" id="drop_list_3">
                	<a class="<? if($countryid==0) echo 'activer';?>" rel="Tất cả" did="0" onclick="return _lTxt(this,3);">Tất cả</a>
				<?php
                $country	=	$db->database("quocgiaid,quocgiaten","country","quocgiaid != 0 ORDER BY quocgiastt ASC");
                for($i=0;$i<count($country);$i++) {
                	$url_country	=	url_link($country[$i][1],0,'quoc-gia');
					if($countryid	==	$country[$i][0]) $ct[$i]	= "activer";
                    echo "<a class=\"".$ct[$i]."\" onclick=\"return _lTxt(this,3);\" did=\"".$country[$i][0]."\" rel=\"".$country[$i][1]."\">".$country[$i][1]."</a>";
                }
				?>
				</div>
<!-- end show film -->
<div class="list-movie">
	<div class="list_movie">
    	<ul>
        <?php
		if($phim) {
			for($i=0;$i<count($phim);$i++) {
				if (in_array($i, array(3,7,11,15,19,23,27,31,35,39))) {
					$class[$i]	=	" fright";
				}
				$url_phim	=	url_link($phim[$i][1].'-'.$phim[$i][2],$phim[$i][0],'phim');
				if ($phim[$i][18] > '100' && $type !== 'phim-new') $icon_hot[$i] = '<span class="hotrap"></span>';
				$filmtxt	=	get_data('film_info','phimtxt','phimid = '.$phim[$i][0]);
				$htmllist	.=	'
						<li>
							<div class="items">
							<a title="'.$phim[$i][1].' - '.$phim[$i][2].'" href="'.$url_phim.'">
								'.$icon_hot[$i].'
								<img class="thumb" src="'.$phim[$i][3].'" alt="'.$phim[$i][1].'">
							</a>
							<div class="mode"><span class="time">'.$phim[$i][4].'</span><span class="quality">'.$phim[$i][5].'</span></div>
							<div class="data">
								<a title="'.$phim[$i][1].' - '.$phim[$i][2].'" href="'.$url_phim.'">
									<h3>'.cut($phim[$i][1],25).'</h3>
								</a>
							</div>
							<div class="movieInfo"><a href="javascript:_PlayMovieZ('.$phim[$i][0].');" class="_play"></a><a href="'.$url_phim.'" class="_view"></a></div>
							<div class="f-description hide">
				<h3>'.cut($phim[$i][1],25).'</h3>
				<div class="below-title">
				<div>'.cut($phim[$i][2],25).' </div>
				<div>'.$phim[$i][4].' | '.$phim[$i][5].'</div>
				</div>
				<p>'.cut($filmtxt,400).'</p>
			</div>
							</div>
						</li>';
			}
			
		}else {
			$htmllist	.=	'<li class="msg">Phần này chưa có dữ liệu!</li>';	
		}
		$htmllist	.='</ul><div class="clr"></div><div class="paging">'.$pagehtml.'</div>';
		echo $htmllist;
		?>
	</div>
</div>
</div>